﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DepartmentWork.Migrator.Data;

namespace DepartmentWork.Migrator
{
    public class DepartmentWorkDbInitializer : IDatabaseInitializer<DepartmentWorkDbContext>
    {
        public void InitializeDatabase(DepartmentWorkDbContext context)
        {
            try
            {

                #region 初始化 团队空间

                var ruanjianTeamspace = new TEAMSPACE()
                {
                    TEAMSPACE_ID = Guid.NewGuid(),
                    TEAMSPACE_NO = "001",
                    TEAMSPACE_NAME = "软件科"
                };

                var kaifaTeamspace = new TEAMSPACE()
                {
                    TEAMSPACE_ID = Guid.NewGuid(),
                    TEAMSPACE_NO = "002",
                    TEAMSPACE_NAME = "开发部"
                };

                #endregion

                #region 初始化 测试项目

                #endregion

                #region 权限表初始化

                ROLE_INFO role1=new ROLE_INFO()
                {
                    DESCRIPTION = "软件科普通用户，普通用户只能进行普通查询",
                    ROLE_ID = 1,
                    ROLE_NAME = "普通用户",
                    STATUE = 0,
                    TEAMSPACE_ID = ruanjianTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role2 = new ROLE_INFO()
                {
                    DESCRIPTION = "软件科开发组组长，具有新增开发项目的权限",
                    ROLE_ID = 2,
                    ROLE_NAME = "开发组组长",
                    STATUE = 0,
                    TEAMSPACE_ID = ruanjianTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role3 = new ROLE_INFO()
                {
                    DESCRIPTION = "软件科运维组组长，具有运维最高权限",
                    ROLE_ID = 3,
                    ROLE_NAME = "运维组组长",
                    STATUE = 0,
                    TEAMSPACE_ID = ruanjianTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role4 = new ROLE_INFO()
                {
                    DESCRIPTION = "软件科项目组组长，具有项目管理的最高权限",
                    ROLE_ID = 4,
                    ROLE_NAME = "项目组组长",
                    STATUE = 0,
                    TEAMSPACE_ID = ruanjianTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role5 = new ROLE_INFO()
                {
                    DESCRIPTION = "软件科团队负责人，软件科团队空间下的最高权限",
                    ROLE_ID = 5,
                    ROLE_NAME = "团队负责人",
                    STATUE = 0,
                    TEAMSPACE_ID = ruanjianTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role6 = new ROLE_INFO()
                {
                    DESCRIPTION = "开发部普通用户，普通用户只能进行普通查询",
                    ROLE_ID = 6,
                    ROLE_NAME = "普通用户",
                    STATUE = 0,
                    TEAMSPACE_ID = kaifaTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role7 = new ROLE_INFO()
                {
                    DESCRIPTION = "开发部开发组组长，具有新增开发项目的权限",
                    ROLE_ID = 7,
                    ROLE_NAME = "开发组组长",
                    STATUE = 0,
                    TEAMSPACE_ID = kaifaTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role8 = new ROLE_INFO()
                {
                    DESCRIPTION = "开发部运维组组长，具有运维最高权限",
                    ROLE_ID = 8,
                    ROLE_NAME = "运维组组长",
                    STATUE = 0,
                    TEAMSPACE_ID = kaifaTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role9 = new ROLE_INFO()
                {
                    DESCRIPTION = "开发部项目组组长，具有项目管理的最高权限",
                    ROLE_ID = 9,
                    ROLE_NAME = "项目组组长",
                    STATUE = 0,
                    TEAMSPACE_ID = kaifaTeamspace.TEAMSPACE_ID
                };

                ROLE_INFO role10 = new ROLE_INFO()
                {
                    DESCRIPTION = "开发部团队负责人，软件科团队空间下的最高权限",
                    ROLE_ID = 10,
                    ROLE_NAME = "团队负责人",
                    STATUE = 0,
                    TEAMSPACE_ID = kaifaTeamspace.TEAMSPACE_ID
                };

                #endregion

                #region 一级菜单初始化


                MENU menu01 = new MENU()
                {
                    AREA_NAME = "",
                    ACTION_NAME = "Index",
                    MENU_ID = 1,
                    BOOT_MENU_ID = 0,
                    CONTROLLER_NAME = "Home",
                    MENU_CONTEXT = "首页菜单描述",
                    MENU_NAME = "首页",
                    MENU_STATUS = 0,
                    MENU_CLASS = "glyphicon glyphicon-home"
                };

                //MENU menu02 = new MENU()
                //{
                //    AREA_NAME = "MailArea",
                //    ACTION_NAME = "Inbox",
                //    MENU_ID = 2,
                //    BOOT_MENU_ID = 0,
                //    CONTROLLER_NAME = "Mail",
                //    MENU_CONTEXT = "邮箱说明",
                //    MENU_NAME = "邮箱",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = "fa fa-envelope"
                //};



                MENU menu02 = new MENU()
                {
                    AREA_NAME = "",
                    ACTION_NAME = "",
                    MENU_ID = 2,
                    BOOT_MENU_ID = 0,
                    CONTROLLER_NAME = "",
                    MENU_CONTEXT = "项目管理菜单描述",
                    MENU_NAME = "项目管理",
                    MENU_STATUS = 0,
                    MENU_CLASS = "fa fa-thumb-tack"
                };


                MENU menu03 = new MENU()
                {
                    AREA_NAME = "PerationAndMaintenanceArea",
                    ACTION_NAME = "Maintenance",
                    MENU_ID = 3,
                    BOOT_MENU_ID = 0,
                    CONTROLLER_NAME = "Maintenance",
                    MENU_CONTEXT = "运维管理菜单描述",
                    MENU_NAME = "运维管理",
                    MENU_STATUS = 0,
                    MENU_CLASS = "fa fa-sun-o"
                };


                MENU menu04=new MENU()
                {
                    AREA_NAME = "DevelopArea",
                    ACTION_NAME = "Index",
                    MENU_ID = 4,
                    BOOT_MENU_ID = 0,
                    CONTROLLER_NAME = "Project",
                    MENU_CONTEXT = "开发管理菜单描述",
                    MENU_NAME = "开发管理",
                    MENU_STATUS = 0,
                    MENU_CLASS = "glyphicon glyphicon-credit-card"
                };




                MENU menu05 = new MENU()
                {
                    AREA_NAME = "",
                    ACTION_NAME = "",
                    MENU_ID = 5 ,
                    BOOT_MENU_ID = 0,
                    CONTROLLER_NAME = "",
                    MENU_CONTEXT = "查询统计菜单描述",
                    MENU_NAME = "查询统计",
                    MENU_STATUS = 0,
                    MENU_CLASS = "fa fa-search"
                };

                //MENU menu07 = new MENU()
                //{
                //    AREA_NAME = "",
                //    ACTION_NAME = "",
                //    MENU_ID = 7,
                //    BOOT_MENU_ID = 0,
                //    CONTROLLER_NAME = "",
                //    MENU_CONTEXT = "知识库管理菜单描述",
                //    MENU_NAME = "知识库管理",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = "fa fa-magic"
                //};

                MENU menu06 = new MENU()
                {
                    AREA_NAME = "",
                    ACTION_NAME = "",
                    MENU_ID = 6,
                    BOOT_MENU_ID = 0,
                    CONTROLLER_NAME = "",
                    MENU_CONTEXT = "科室管理菜单描述",
                    MENU_NAME = "科室管理",
                    MENU_STATUS = 0,
                    MENU_CLASS = "fa fa-hospital-o"
                };

                //MENU menu09 = new MENU()
                //{
                //    AREA_NAME = "",
                //    ACTION_NAME = "",
                //    MENU_ID = 9,
                //    BOOT_MENU_ID = 0,
                //    CONTROLLER_NAME = "",
                //    MENU_CONTEXT = "资源下载菜单描述",
                //    MENU_NAME = "资源下载",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = "glyphicon glyphicon-cloud-download"
                //};

                MENU menu07 = new MENU()
                {
                    AREA_NAME = "",
                    ACTION_NAME = "",
                    MENU_ID = 7,
                    BOOT_MENU_ID = 0,
                    CONTROLLER_NAME = "",
                    MENU_CONTEXT = "系统设置管理描述",
                    MENU_NAME = "系统设置",
                    MENU_STATUS = 0,
                    MENU_CLASS = "fa fa-gear"
                };

                //MENU menu11 = new MENU()
                //{
                //    AREA_NAME = "",
                //    ACTION_NAME = "",
                //    MENU_ID = 11,
                //    BOOT_MENU_ID = 0,
                //    CONTROLLER_NAME = "",
                //    MENU_CONTEXT = "关于我菜单描述",
                //    MENU_NAME = "关于我",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = "glyphicon glyphicon-user"
                //};

                //MENU menu12 = new MENU()
                //{
                //    AREA_NAME = "",
                //    ACTION_NAME = "",
                //    MENU_ID = 12,
                //    BOOT_MENU_ID = 0,
                //    CONTROLLER_NAME = "",
                //    MENU_CONTEXT = "项目简介菜单描述",
                //    MENU_NAME = "项目简介",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = "glyphicon glyphicon-th-large"
                //};



                #endregion

                #region 二级菜单初始化

                MENU menu08 = new MENU()
                {
                    AREA_NAME = "ProjectManageArea",
                    ACTION_NAME = "Index",
                    MENU_ID = 8,
                    BOOT_MENU_ID = 2,
                    CONTROLLER_NAME = "Project",
                    MENU_CONTEXT = "项目列表描述",
                    MENU_NAME = "项目列表",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };

                //MENU menu14 = new MENU()
                //{
                //    AREA_NAME = "",
                //    ACTION_NAME = "",
                //    MENU_ID = 14,
                //    BOOT_MENU_ID = 3,
                //    CONTROLLER_NAME = "",
                //    MENU_CONTEXT = "工作记录描述",
                //    MENU_NAME = "工作记录",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = ""
                //};

               


                //MENU menu16 = new MENU()
                //{
                //    AREA_NAME = "",
                //    ACTION_NAME = "",
                //    MENU_ID = 16,
                //    BOOT_MENU_ID = 4,
                //    CONTROLLER_NAME = "",
                //    MENU_CONTEXT = "系统查询描述",
                //    MENU_NAME = "系统查询",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = ""
                //};

                //MENU menu17 = new MENU()
                //{
                //    AREA_NAME = "",
                //    ACTION_NAME = "",
                //    MENU_ID = 17,
                //    BOOT_MENU_ID = 4,
                //    CONTROLLER_NAME = "",
                //    MENU_CONTEXT = "工作记录描述",
                //    MENU_NAME = "工作记录",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = ""
                //};

                //MENU menu18 = new MENU()
                //{
                //    AREA_NAME = "",
                //    ACTION_NAME = "",
                //    MENU_ID = 18,
                //    BOOT_MENU_ID = 4,
                //    CONTROLLER_NAME = "",
                //    MENU_CONTEXT = "运维账号管理描述",
                //    MENU_NAME = "运维账号管理",
                //    MENU_STATUS = 0,
                //    MENU_CLASS = ""
                //};

                MENU menu09 = new MENU()
                {
                    AREA_NAME = "DepartmentArea",
                    ACTION_NAME = "DeskWork",
                    MENU_ID = 9,
                    BOOT_MENU_ID = 6,
                    CONTROLLER_NAME = "DeskWork",
                    MENU_CONTEXT = "科室工作描述",
                    MENU_NAME = "科室工作",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };

                MENU menu10 = new MENU()
                {
                    AREA_NAME = "DepartmentArea",
                    ACTION_NAME = "Leave",
                    MENU_ID = 10,
                    BOOT_MENU_ID = 6,
                    CONTROLLER_NAME = "Leave",
                    MENU_CONTEXT = "请假描述",
                    MENU_NAME = "请假",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };
                MENU menu11 = new MENU()
                {
                    AREA_NAME = "DepartmentArea",
                    ACTION_NAME = "Index",
                    MENU_ID = 11,
                    BOOT_MENU_ID = 6,
                    CONTROLLER_NAME = "Overtime",
                    MENU_CONTEXT = "加班描述",
                    MENU_NAME = "加班",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };

                MENU menu12 = new MENU()
                {
                    AREA_NAME = "ProjectManageArea",
                    ACTION_NAME = "Index",
                    MENU_ID = 12,
                    BOOT_MENU_ID = 6,
                    CONTROLLER_NAME = "Monthly",
                    MENU_CONTEXT = "月报维护描述",
                    MENU_NAME = "月报维护",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };

                MENU menu13 = new MENU()
                {
                    AREA_NAME = "SystemSettingArea",
                    ACTION_NAME = "Index",
                    MENU_ID = 13,
                    BOOT_MENU_ID = 7,
                    CONTROLLER_NAME = "Role",
                    MENU_CONTEXT = "权限管理描述",
                    MENU_NAME = "权限管理",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };

                MENU menu14 = new MENU()
                {
                    AREA_NAME = "SystemSettingArea",
                    ACTION_NAME = "Index",
                    MENU_ID = 14,
                    BOOT_MENU_ID = 7,
                    CONTROLLER_NAME = "Employee",
                    MENU_CONTEXT = "人员管理描述",
                    MENU_NAME = "人员管理",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };

                MENU menu15 = new MENU()
                {
                    AREA_NAME = "SystemSettingArea",
                    ACTION_NAME = "Index",
                    MENU_ID = 15,
                    BOOT_MENU_ID = 7,
                    CONTROLLER_NAME = "Menu",
                    MENU_CONTEXT = "菜单管理描述",
                    MENU_NAME = "菜单管理",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };


                MENU menu16 = new MENU()
                {
                    AREA_NAME = "ProjectManageArea",
                    ACTION_NAME = "OtherWorkReocred",
                    MENU_ID = 16,
                    BOOT_MENU_ID = 2,
                    CONTROLLER_NAME = "WorkReocred",
                    MENU_CONTEXT = "散件工作记录描述",
                    MENU_NAME = "散件工作记录",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };
















                MENU menu17 = new MENU()
                {
                    AREA_NAME = "QueryArea",
                    ACTION_NAME = "Query",
                    MENU_ID = 17,
                    BOOT_MENU_ID = 5,
                    CONTROLLER_NAME = "Query",
                    MENU_CONTEXT = "模糊查询描述",
                    MENU_NAME = "模糊查询",
                    MENU_STATUS = 0,
                    MENU_CLASS = "fa fa-search"
                };
                MENU menu18 = new MENU()
                {
                    AREA_NAME = "QueryArea",
                    ACTION_NAME = "SelcetDeskWork",
                    MENU_ID = 18,
                    BOOT_MENU_ID = 5,
                    CONTROLLER_NAME = "DeskWorkSelcet",
                    MENU_CONTEXT = "科室工作查询描述",
                    MENU_NAME = "科室工作查询",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };
                MENU menu19 = new MENU()
                {
                    AREA_NAME = "QueryArea",
                    ACTION_NAME = "SelcetOperationWork",
                    MENU_ID = 19,
                    BOOT_MENU_ID = 5,
                    CONTROLLER_NAME = "OperationWorkSelcet",
                    MENU_CONTEXT = "运维工作查询描述",
                    MENU_NAME = "运维工作查询",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };
                MENU menu20 = new MENU()
                {
                    AREA_NAME = "QueryArea",
                    ACTION_NAME = "SelcetProjectWork",
                    MENU_ID = 20,
                    BOOT_MENU_ID = 5,
                    CONTROLLER_NAME = "ProjectWorkSelcet",
                    MENU_CONTEXT = "项目工作查询描述",
                    MENU_NAME = "项目工作查询",
                    MENU_STATUS = 0,
                    MENU_CLASS = ""
                };






                #endregion

                #region 权限-菜单 初始化

                //MENU_ROLE menurole01=new MENU_ROLE()
                //{
                //    MENU_ROLE_ID = 1,
                //    MENU_ID = 5,
                //    ROLE_ID = 2
                //};

                MENU_ROLE menurole02 = new MENU_ROLE()
                {
                    MENU_ROLE_ID = 2,
                    MENU_ID = 4,
                    ROLE_ID = 3
                };

                MENU_ROLE  menurole03 = new MENU_ROLE()
                {
                    MENU_ROLE_ID = 3,
                    MENU_ID = 3,
                    ROLE_ID = 4
                };

                MENU_ROLE menurole04 = new MENU_ROLE()
                {
                    MENU_ROLE_ID = 4,
                    MENU_ID = 13,
                    ROLE_ID = 5
                };

                

                #endregion

                #region 初始化权限角色

                EMP_AUTHORITY auth01=new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "项目管理工作记录操作权限",
                    AUTHORITY_ILLUSTRATE = "项目管理工作记录操作权限说明"
                };

                EMP_AUTHORITY auth02 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "项目管理新增操作权限",
                    AUTHORITY_ILLUSTRATE = "项目管理新增操作权限说明"
                };

                EMP_AUTHORITY auth03 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "运维管理工作记录操作权限",
                    AUTHORITY_ILLUSTRATE = "运维管理工作记录操作权限说明"
                };

                EMP_AUTHORITY auth04 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "运维管理新增操作权限",
                    AUTHORITY_ILLUSTRATE = "运维管理新增操作权限说明"
                };

                EMP_AUTHORITY auth05 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "开发管理项目细节操作权限",
                    AUTHORITY_ILLUSTRATE = "开发管理项目细节操作权限说明"
                };

                EMP_AUTHORITY auth06 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "开发管理项目操作权限",
                    AUTHORITY_ILLUSTRATE = "开发管理项目操作权限说明"
                };

                EMP_AUTHORITY auth07 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "科室管理操作权限",
                    AUTHORITY_ILLUSTRATE = "科室管理操作权限说明"
                };

                EMP_AUTHORITY auth08 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "科室管理记录权限",
                    AUTHORITY_ILLUSTRATE = "科室管理记录权限说明"
                };

                EMP_AUTHORITY auth09 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "请假审批权限",
                    AUTHORITY_ILLUSTRATE = "请假审批权限说明"
                };

                EMP_AUTHORITY auth10 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "请假查询统计权限",
                    AUTHORITY_ILLUSTRATE = "请假查询统计权限说明"
                };

                EMP_AUTHORITY auth11 = new EMP_AUTHORITY()
                {
                    AUTHORITY_ID = Guid.NewGuid(),
                    AUTHORITY_TITLE = "月报操作权限",
                    AUTHORITY_ILLUSTRATE = "月报操作权限说明"
                };






                #endregion

                USER_INFO user01=new USER_INFO()
                {
                    USER_ID = Guid.NewGuid() ,
                    DISPLAY_NAME = "AAAA",
                    ENABLE = "1",
                    LOGIN_NAME = @"Bj\1234567",
                    PASSWD = "PassW0rd"
                };

                USER_INFO user02 = new USER_INFO()
                {
                    USER_ID = Guid.NewGuid(),
                    DISPLAY_NAME = "BBB",
                    ENABLE = "1",
                    LOGIN_NAME = @"Bj\3126547",
                    PASSWD = "PassW0rd"
                };

                USER_TEAMSAPCE ut01=new USER_TEAMSAPCE()
                {
                    TEAMSPACE_ID = kaifaTeamspace.TEAMSPACE_ID,
                    ROLE_ID = 5,
                    USER_ID = user02.USER_ID,
                    USER_TEAMSAPCE_ID = Guid.NewGuid()
                };

                USER_TEAMSAPCE ut02 = new USER_TEAMSAPCE()
                {
                    TEAMSPACE_ID = ruanjianTeamspace.TEAMSPACE_ID,
                    ROLE_ID = 5,
                    USER_ID = user01.USER_ID,
                    USER_TEAMSAPCE_ID = Guid.NewGuid()
                };

                
                #region 提交初始化数据

                //context.Projects_Develop.Add(projects);
                context.Teamspaces.Add(ruanjianTeamspace);
                context.Teamspaces.Add(kaifaTeamspace);
                //context.Projects_Develop.Add(pd);
                context.RoleInfos.Add(role1);
                context.RoleInfos.Add(role2);
                context.RoleInfos.Add(role3);
                context.RoleInfos.Add(role4);
                context.RoleInfos.Add(role5);
                context.RoleInfos.Add(role6);
                context.RoleInfos.Add(role7);
                context.RoleInfos.Add(role8);
                context.RoleInfos.Add(role9);
                context.RoleInfos.Add(role10);
                context.Menu.Add(menu01);
                context.Menu.Add(menu02);
                context.Menu.Add(menu03);
                context.Menu.Add(menu04);
                context.Menu.Add(menu05);
                context.Menu.Add(menu06);
                context.Menu.Add(menu07);
                context.Menu.Add(menu08);
                context.Menu.Add(menu09);
                context.Menu.Add(menu10);
                context.Menu.Add(menu11);
                context.Menu.Add(menu12);
                context.Menu.Add(menu13);
                context.Menu.Add(menu14);
                context.Menu.Add(menu15);
                context.Menu.Add(menu16);
                context.Menu.Add(menu17);
                context.Menu.Add(menu18);
                context.Menu.Add(menu19);
                context.Menu.Add(menu20);
                


                //context.Menu_Role.Add(menurole01);
                context.Menu_Role.Add(menurole02);
                context.Menu_Role.Add(menurole03);
                context.Menu_Role.Add(menurole04);


                context.UserInfos.Add(user01);
                context.UserInfos.Add(user02);

                context.UserTeamspace.Add(ut01);
                context.UserTeamspace.Add(ut02);


                context.Emp_Authority.Add(auth01);
                context.Emp_Authority.Add(auth02);
                context.Emp_Authority.Add(auth03);
                context.Emp_Authority.Add(auth04);
                context.Emp_Authority.Add(auth05);
                context.Emp_Authority.Add(auth06);
                context.Emp_Authority.Add(auth07);
                context.Emp_Authority.Add(auth08);
                context.Emp_Authority.Add(auth09);
                context.Emp_Authority.Add(auth10);
                context.Emp_Authority.Add(auth11);

                context.SaveChanges();

                #endregion
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
    }
}
